﻿using System;
using System.Collections.Generic;
using System.Text;
using IDAL.RF.QuantityandTime;
using Model.RF.QuantityInfo;

namespace BLL.RF.QuantityandTime
{
    public class Test_PRDepartment
    {
        private static readonly ITest_PRDepartment dal = DALFactory.DataAccess.CreateTest_PRDepartment();

        public IList<Department_PRInfo> GetPRbyTimeD_Department(DateTime starttime, DateTime stoptime)
        {
            return dal.GetPRbyTimeD_Department(starttime, stoptime);
        }
        public IList<Department_PRInfo> GetPRbyTimeD_Department_TestUser(DateTime starttime, DateTime stoptime)
        {
            return dal.GetPRbyTimeD_Department_TestUser(starttime, stoptime);
        }
        public IList<Department_PRInfo> GetPRbyTimeD_Department_DebugTestUser(string department, DateTime starttime, DateTime stoptime)
        {
            return dal.GetPRbyTimeD_Department_DebugTestUser(department, starttime, stoptime);
        }

        //**************************************以上为最终合格率，以下为一次合格率********************************************

        public IList<Department_PRInfo> GetOPRbyTimeD_Department(DateTime starttime, DateTime stoptime)
        {
            return dal.GetOPRbyTimeD_Department(starttime, stoptime);
        }
        public IList<Department_PRInfo> GetOPRbyTimeD_Department_TestUser(DateTime starttime, DateTime stoptime)
        {
            return dal.GetOPRbyTimeD_Department_TestUser(starttime, stoptime);
        }
        public IList<Department_PRInfo> GetOPRbyTimeD_Department_DebugTestUser(string department, DateTime starttime, DateTime stoptime)
        {
            return dal.GetOPRbyTimeD_Department_DebugTestUser(department, starttime, stoptime);
        }

        //排序没有用
        //private IList<Department_PRInfo> ListSort(IList<Department_PRInfo> list)
        //{
        //    IList<Department_PRInfo> list_total = new List<Department_PRInfo>();
        //    foreach (Department_PRInfo item in list)
        //    {
        //        if (item.DayTime == "时间段合计")
        //        {
        //            list_total.Add(item);
        //        }
        //    }
        //    foreach (Department_PRInfo item in list)
        //    {
        //        if (!list_total.Contains(item))
        //            list_total.Add(item);
        //    }
        //    return list_total;
        //}
    }
}
